class Siteadmin::ResearchesController < ApplicationController
	before_filter :require_admin
	load_and_authorize_resource :through => :profile

	active_scaffold :researches do |config|
		config.create.columns.exclude :profile
		config.update.columns.exclude :profile

		config.columns[:name].label = "Research Name"
		config.columns[:yearfinish].label = "ปีที่เสร็จ"
		#config.columns[:organization].label = "ประเภทงานวิจัย/โครงงาน"

		config.list.columns = [:name, :advisor, :organization, :yearfinish]
		config.create.columns = [:name, :advisor, :organization, :yearfinish]
		config.update.columns = [:name, :advisor, :organization, :yearfinish]
	end
end
